package com.cungmua.app.model.request;

import com.cungmua.app.utils.AppUtils;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * Created by kelvin.nguyen on 7/23/14.
 */
public class OrderDetailsRequest extends AuthenticatedRequest {
    private int userId;
    private int orderId;

    public OrderDetailsRequest(String deviceId, String token) {
        super(deviceId, token);
    }


    public void setUserId(int userId) {
        this.userId = userId;
    }


    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }


    @JsonProperty("UserId")
    public int getUserId() {
        return userId;
    }

    @JsonProperty("OrderId")
    public int getOrderId() {
        return orderId;
    }


    @Override
    public String getSign() {
        return AppUtils.MD5(String.valueOf(getUserId()) + getOrderId()+ getVersion()
                + getDeviceId() + getToken());
    }
}
